home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / COP.ZIP / RECTPIE.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-16  |  911 b   |  43 lines

  1. #ifndef rectpie_HPP
  2. #define rectpie_HPP
  3.  
  4. #ifndef shape_HPP
  5. #include "shape.hpp"
  6. #endif
  7.  
  8. class Rectangle : public Shape  {
  9.     unsigned width, heighth;
  10. public:
  11.     Rectangle(unsigned width
  12.             = (unsigned) getmaxx()/4,
  13.         unsigned heighth
  14.             = (unsigned) getmaxy()/4,
  15.         unsigned x = 0, unsigned y = 0)
  16.         : Shape((x?x:width/2),(y?y:heighth/2))
  17.         {
  18.             this->width = width;
  19.             this->heighth = heighth;
  20.         }
  21.     virtual void show(int xxpose = 0,
  22.         int yxpose = 0, unsigned scale = 0);
  23. };
  24.  
  25.  
  26. class PieSlice : public Circle  {
  27.     unsigned startAngle, endAngle;
  28. public:
  29.     PieSlice(unsigned startAngle = 30,
  30.         unsigned endAngle = 60,
  31.         unsigned radius
  32.             = (unsigned) getmaxy()/8,
  33.         unsigned x = 0, unsigned y = 0)
  34.         : Circle(radius,x,y)
  35.         {
  36.             this->startAngle = startAngle;
  37.             this->endAngle = endAngle;
  38.         }
  39.     virtual void show(int xxpose = 0,
  40.         int yxpose = 0, unsigned scale = 1);
  41. };
  42.  
  43. #endif